package jass.iss.edu.Screen;

import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;

public class MainScreen extends JFrame {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	//Frame properties
	public JFrame app_Frame;
	public String app_FrameTitle;
	
	//Layout
	private BorderLayout app_Layout;
	
	//Panel 
	private JPanel app_Panel;
	
	//Button
	private JButton app_Button;
		
	public MainScreen() {
		
		app_FrameTitle = "JASS";
		app_Frame = new JFrame(app_FrameTitle);
		
		//TO be removed for testing only
		app_Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		//Buttons
		app_Button = new JButton("Manage Advertisement");
		
		app_Layout = new BorderLayout();
		app_Panel = new JPanel(app_Layout);
		app_Panel.add(app_Button);
		app_Frame.getContentPane().add(app_Panel,BorderLayout.CENTER);
		
		app_Frame.pack();
		app_Frame.setVisible(true);
		
	}
	
	public void addManageAdvertisementListener(ActionListener al) {
		
		this.app_Button.addActionListener(al);
	}

}
